package com.example.chenz.logactivity;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity {

    private static final String LIFT_TAG ="LogActivity";
    private Button button;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Log.v(MainActivity.LIFT_TAG,"onCreate:FirstActivity");
        button = (Button)findViewById(R.id.button);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.setClass(MainActivity.this,LogActivity.class);
                MainActivity.this.startActivity(intent);
            }
        });
    }

    protected void onPause() {
        Log.v(MainActivity.LIFT_TAG,"onPause:FirstActivity");
        super.onPause();
    }

    protected void onDestroy() {
        Log.v(MainActivity.LIFT_TAG,"onDestroy:FirstActivity");
        super.onDestroy();
    }

    protected void onRestart() {
        Log.v(MainActivity.LIFT_TAG,"onRestart:FirstActivity");
        super.onRestart();
    }

    protected void onResume() {
        Log.v(MainActivity.LIFT_TAG,"onResume:FirstActivity");
        super.onResume();
    }

    protected void onStart() {
        Log.v(MainActivity.LIFT_TAG,"onStart:FirstActivity");
        super.onStart();
    }

    protected void onStop() {
        Log.v(MainActivity.LIFT_TAG,"onStop:FirstActivity");
        super.onStop();
    }
}
